use "dataset_east_baton_rouge_police_violence", clear

drop agency articles baseline

format date %tdnn/dd/YY

tostring date, format("%tdnn/dd/YY") replace force

tostring hits, format(%20.02f) replace

tostring *, replace

replace race = "Black" if regex(race, "Black")
replace race = "White" if regex(race, "White")
replace race = "Unspecified" if regex(race, "unspecified")

foreach x of varlist * {
	replace `x' = "\cellcolor{light-gray}\textbf{" + `x' + "}" if ///
		regex(name, "Alton Sterling")
}

#delimit;

listtex 
	using "_output/table A6.tex"
	,
		replace 
		type 
		rstyle(tabular) 	
		head(
			\begin{tabular*}{\hsize}{@{\hskip\tabcolsep
				\extracolsep\fill}l*{6}{l}}
			\toprule Date & Name & Race & Armed & Cause of Death 
				& Coverage \\
			\midrule
		)
		foot("\bottomrule\end{tabular*}")
		;
		
#delimit cr
